const { config } = require('./common')
const { apiPrefix } = config
let database = {
    "result": {
        "code": "success",
        "msg": "查询成功！",
    },
    "body": {
         "pageout": {
            "currentpagenum": 1,
            "rowcountall": 2,
            "pagecountall": 1,
            "currentpagecount": 1,
        },
        "list": [{
            "code":"10000",
            "pub_code_id": "10001",
            "sub_msg": "10.10.10.120:8888",
            "creator": "1",
            "updateor": "23",
            "update_time": "23",
            "sub_codes": [{
                "pub_code_id": "10001",
                "code": "10000",
                "sub_code": "isp.unknow-error",
                "sub_msg": "失败",
                "solution": "解决方案",
                "creator": "admin",
                "updater": "admin",
                "update_time": "2017-08-08 11:22:11",
            }],
        }, {
             "code":"20000",
            "pub_code_id": "10002",
            "sub_msg": "10.10.10.120:8888",
            "creator": "1",
            "updateor": "23",
            "update_time": "23",
            "sub_codes": [{
                "pub_code_id": "10001",
                "code": "20000",
                "sub_code": "isp.unknow-error",
                "sub_msg": "失败",
                "solution": "解决方案",
                "creator": "admin2",
                "updater": "admin2",
                "update_time": "2018-08-08 11:22:11",
            }, {
                "pub_code_id": "10002",
                "code": "20000",
                "sub_code": "isp.unknow-error",
                "sub_msg": "失败",
                "solution": "解决方案",
                "creator": "admin2",
                "updater": "admin2",
                "update_time": "2018-08-08 11:22:11",
            }],
        }],
    },
}

module.exports = {
  [`GET ${apiPrefix}/codeList`] (req, res) {
    res.status(200).json(database)
  },
}
